package cn.piesat.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 项目启动时初始化配置文件里参数，供filter使用
 * @author zyp
 * @date 2021/3/23
 */
@Component
@ConfigurationProperties(prefix = "application")
public class AppConfig {
    public static String LOG_URL;
    public static String TOKEN_URL;
    @Value("${log_url}")
    public void setLogUrl(String logUrl){
        AppConfig.LOG_URL = logUrl;
    }
    @Value("${token_url}")
    public void setTokenUrl(String tokenUrl){
        AppConfig.TOKEN_URL = tokenUrl;
    }
}
